<html>
<%@ include file="/WEB-INF/views/include.jsp" %>
<body>
<div id="wrapperbody">
<div id="wrapper">

<%@ include file="/WEB-INF/views/header.jsp" %>

<div id="contentwrap">
<div id="content" style='text-align:center;'>

<br>
<h1>RANKING E-SPORT</h1>
 <br><br>
 <table><tr><td>
 <form:form method="post" action="${baseURL}/ranking" commandName="formjuego">		  
<div class="" >


    <div class="" style='text-align:center;margin: 0px 0 0px;' >
      
       
        
        <div class="" style='text-align:center;width:940px'   >
        <h1> Ranking ${modotitulo} ${nombrejuego1}</h1>
         <br>
         <table><tr>
         <td width=180></td>
         <td>
         <div style='width:600px;text-align:center;margin: 0px 0 0px;' >
         <div  style='text-align:left;'>
            <form:select path="juego1" items="${listadojuegos}" class='cajaselec' onchange='document.getElementById("formjuego").submit();'  />
            &nbsp;&nbsp;&nbsp;&nbsp;
            <form:select path="modo1" items="${listadomodo}" class='cajaselec' onchange='document.getElementById("formjuego").submit();'  />
        </div>
        <br>
       
        <c:choose>
         <c:when test="${fn:length(rank1) > 0}">
        
          <table class='CSSTableGenerator'    >
         	<tr>
         		
         		<td width=50>Ranking</td>
         		<td width=25></td>
         		<td width=200>Player</td>
         		<td width=100>Puntos</td>
         	</tr>
		         <c:forEach  varStatus="index"  var="rank" items="${rank1}">
		         <tr  style='cursor:pointer;' onclick='location.href="${baseURL}/player/perfil?id=${rank.idusuario}"'>
		          <td style='text-align:center'>${index.index+1}</td>
		         <td>
		       <c:choose>
         		<c:when test="${empty rank.urlimagen }">
         		<img src="${baseURL}/resources/images/no.jpg" width='25' height='25' >
		      </c:when>
		      <c:otherwise>
		      <img src="${rank.urlimagen}" width='25' height='25' >
		      </c:otherwise>
		      </c:choose>
		         </td>
		  		
		  		 <td>${rank.username}</td>
		  		 <td>${rank.puntos} Pts.</td>
		         </tr>
		         </c:forEach>
          </table>
        
          </c:when>
         <c:otherwise>
        
         <br><br>
        <div style='text-align:center;'>
         <br><br><br><br><h1>Raking sin Players</h1><br><br>
         </div>
         
         </c:otherwise>
         </c:choose>
        
         
         
         
         
          </div>
          </td>
          </tr>
          </table>
           
        </div>

    </div>
    
    
</div>
</form:form>
</td></tr></table>
<br><br>
<div style='text-align:center;'><br><br>${propaganda.publicidad[2].cuerpo}</div>
 </div>
</div> 
   
</div>
</div>
   <%@ include file="/WEB-INF/views/fooder.jsp" %> 
</body>
</html>